package net.toocruel.iqismart.entity.core;

import net.toocruel.iqismart.entity.base.BaseEntity;
import net.toocruel.iqismart.entity.rbac.User;

import javax.persistence.*;

/**
 * @Description
 * @Auther sty
 * @createTime 2018/5/8 上午11:35
 */
@Entity
public class QuestionInvitation extends BaseEntity {
    private static final long serialVersionUID = -8586375354494081185L;
    @OneToOne(cascade = CascadeType.DETACH,fetch = FetchType.LAZY)
    @JoinColumn(name = "questionId")
    private Question question;
    @ManyToOne(cascade = CascadeType.DETACH,fetch = FetchType.LAZY)

    private User fromUser;
    @ManyToOne(cascade = CascadeType.DETACH,fetch = FetchType.LAZY)
    @JoinColumn(name = "toUserId")
	private User toUser;
    private String toEmail;
    private Integer status ;


    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Question getQuestion() {
        return question;
    }

    public void setQuestion(Question question) {
        this.question = question;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public User getFromUser() {
        return fromUser;
    }

    public void setFromUser(User fromUser) {
        this.fromUser = fromUser;
    }

    public User getToUser() {
        return toUser;
    }

    public void setToUser(User toUser) {
        this.toUser = toUser;
    }

    public String getToEmail() {
        return toEmail;
    }

    public void setToEmail(String toEmail) {
        this.toEmail = toEmail;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }
}
